using CGF;
using UnityEngine;

public class BtnService : MonoBehaviour
{
    private void Awake()
    {
        GetComponent<CButton>().SetClick(() =>
        {
            string url = Config.Get.OnlineServiceUrl;
            if (url.Contains("{user_id}"))
            {
                url = url.Replace("{user_id}", UserInfo.UserId);
            }
            if (Define.IsWebGL)
            {
                Application.OpenURL(url);
            }
            else
            {
                PanelWebView.Open(url);
            }
        });
    }
}
